<%-- 
    Document   : patienthome
    Created on : Jun 5, 2012, 11:18:06 AM
    Author     : sai
--%>     

<%@page import="javax.xml.ws.Response"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>patient home </title>
        <link href="style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript"> </script>  
    </head>
    <body>     
        <%@page import="java.sql.*,java.io.*,sai.mysql.DriverLoading" %>
            <%!                
                Statement state;
                ResultSet result;
                String userid;
                String url;
                String pid, uid, pat_name, fa_name, dob, email, address, mobile;
            %>
              <%
                try {
                    DriverLoading dl = new DriverLoading();
                    state=dl.getStatement();
                    userid = request.getParameter("username");
                    url = "select PATIENT_ID,USERID,PATIENT_NAME,FATHER_NAME,DOB,EMAIL,ADDRESS,MOBILE from `patient` where userid='" + userid + "'";
                    result = state.executeQuery(url);
                    boolean b = result.next();
                    if (b) {
                        pid = result.getString(1);                       
                        uid = result.getString(2);
                        pat_name = result.getString(3);
                        fa_name = result.getString(4);
                        dob = result.getString(5);
                        email = result.getString(6);
                        address = result.getString(7);
                        mobile = result.getString(8);                        
                    }

                } catch (SQLException e) {
                    out.println("Sql exception raised: . ." + e);
                } catch (Exception e) {
                    out.println("Exception raised  . . " + e);
                }
            %>
        <div id="header"></div>
        <div id="navigation"><ul>                
                <li><a href="patientupdate.html">update profile</a></li>
                <li><a href="search.html">Search</a><li>
                <li><a href="#">get appointment</a></li>     //getappointment 
                <li><a href="insurance.jsp?uid=<%=pid%>" >insurance</a></li>
            </ul></div>
        
            
    <center>
        <table border="0" style="background:#669d37">            
          
            <tr>
                <th>welcome Mr:<u><b><%=pat_name%></b></u></th>
                <td ><a href="logout.jsp" style="margin-top:60px;margin-left:300px;">Logout</td>
            </tr>
            <tr>
                <td></td>
                <td></td>
            <tr>
            <tr>
                <td>Name:</td>
                <td><%=pat_name%></td>
            </tr>
            <tr>
                <td>Patient id:</td>
                <td><input type="text" name ="pid1" id="pid1" value="<%=pid%>" readonly="readonly" /></td>
            </tr>
            <tr>
                <td>s/o:</td>
                <td><%=fa_name%></td>
            </tr>
            <tr>
                <td>Date of Birth(yyyy-mm-dd):</td>
                <td><%=dob%></td>
            </tr>        
            <tr>
                <td>u'r user id is:</td>
                <td><%=uid%></td>
            </tr>
            <tr>
                <td>Email address:</td>
                <td><%=email%></td>
            </tr>
            <tr>
                <td>Address:</td>
                <td><%=address%></td>
            </tr>
            <tr>
                <td>Mobile:</td>
                <td><%=mobile%></td>
            </tr>
        </table>
    </center>  
</body>
</html>

